import Vue from "vue";
import Vuex from "vuex";
Vue.use(Vuex);
let store = new Vuex.Store({
    state:{
        playState:false,
        msg:0,
        list:[],
        listIndex:null,

    },
    mutations:{
        change:function(state,data){
            state.playState = data.playState;
            if(data.id !== undefined){
                state.msg = data.id;
            }
        },
        changlist(state,data){
            state.list = data.songList;
            state.listIndex = data.index;
        }
    }
})
//输出
export default store;